﻿using System.ComponentModel;
using Aeon.Configuration;

namespace Aeon.Emulator.Sound.Midi
{
    /// <summary>
    /// Describes General MIDI settings.
    /// </summary>
    [Category("Sound")]
    [DeviceConfiguration("Aeon.GeneralMidi")]
    public sealed class GeneralMidiConfiguration : DeviceConfiguration
    {
        /// <summary>
        /// Initializes a new instance of the GeneralMidiConfiguration class.
        /// </summary>
        public GeneralMidiConfiguration()
            : base("General MIDI")
        {
        }

        /// <summary>
        /// Returns a new instance of the emulated device.
        /// </summary>
        /// <param name="p">Extra parameters which may be used for initialization.</param>
        /// <returns>New instance of the emulated device.</returns>
        public override IVirtualDevice Create(CreateDeviceParameters p)
        {
            return new GeneralMidi();
        }
        /// <summary>
        /// Returns a deep copy of the device configuration.
        /// </summary>
        /// <returns>Deep copy of the device configuration.</returns>
        public override IDeviceConfiguration Clone()
        {
            return new GeneralMidiConfiguration()
            {
                IsEnabled = this.IsEnabled
            };
        }
    }
}
